* pre-crt0.c (data_start): Initialize to 1.
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 12 Feb 2013 18:33:42 +0000 (10:33 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 12 Feb 2013 18:33:42 +0000 (10:33 -0800)
This ports to compilers that optimize the external declaration
'int x = 0;' as if it were 'int x;' to shrink the executable.

src/ChangeLog
src/pre-crt0.c

index 40d322450b1009318004b72568048499e77688ad..8ae23c1b83a133bf36adae22c82d89d90863d92e 100644 (file)
@@ -1,3 +1,9 @@
+2013-02-12  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * pre-crt0.c (data_start): Initialize to 1.
+       This ports to compilers that optimize the external declaration
+       'int x = 0;' as if it were 'int x;' to shrink the executable.
+
 2013-02-11  Paul Eggert  <eggert@cs.ucla.edu>
 
        Improve AIX port (Bug#13650).
index ea5736eba2ac248435ddd5c6761cb8b04f062ec8..6b9618c8dc30437a1878a7dd58694879711b2d6c 100644 (file)
@@ -4,7 +4,7 @@
    that make environ an initialized variable.  However, we do
    need to make sure the label data_start exists anyway.  */
 
-/* Create a label to appear at the beginning of data space.  */
-
-int data_start = 0;
+/* Create a label to appear at the beginning of data space.
+   Its value is nonzero so that it cannot be put into bss.  */
 
+int data_start = 1;